package wxapp

import (
	"context"
	v1 "hotgo/api/api/wxapp/v1"
	"hotgo/internal/service"
)

// SinglePage 单页
func (c *ControllerV1) SinglePage(ctx context.Context, req *v1.SinglePageReq) (res *v1.SinglePageRes, err error) {
	res = &v1.SinglePageRes{}
	res.Title, res.Content, err = service.Wxapp().SinglePage(ctx, req.Id)
	return
}

// OrderList 订单列表
func (c *ControllerV1) OrderList(ctx context.Context, req *v1.OrderListReq) (res *v1.OrderListRes, err error) {
	res = &v1.OrderListRes{}
	res.List, res.TotalCount, err = service.Wxapp().OrderList(ctx, req.Page, req.PageSize, req.Status)
	return
}
